// index.js
import dayjs from 'dayjs'
Page({
  onLoad(options) {
    console.log('使用 npm 包');
    console.log(dayjs().format('YYYY-MM-DD HH:mm:ss'));
    wx.setStorageSync('msg', '72期本地存储')
  },
  toIndex2() {
    console.log('跳转');
    wx.navigateTo({
      url: '/baoA/index2/index2',
      success: ({eventChannel}) => {
        console.log('第一页');
        console.log(eventChannel);
        setInterval(() => {
          eventChannel.emit('sendMsg', '啦啦啦')
        }, 1000);
      }
    });
      
  }
})
